﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace ETC.DLEDLightingSystemPlus.Models
{
    public class RootDIYLedModel : Bandit.UI.MVVM.NotifyObject
    {

        private string _RootName;

        public string RootName { get { return _RootName; } set { _RootName = value; OnPropertyChanged(nameof(RootName)); } }

        private bool _IsTest = true;

        public bool IsTest { get { return _IsTest; } set { _IsTest = value; OnPropertyChanged(nameof(IsTest)); } }

        private string _PathName;

        public string PathName
        {
            get { return _PathName; }
            set
            {

                _PathName = value;

                OnPropertyChanged(nameof(PathName));
            }
        }
        private string _xmlPathName;

        public string xmlPathName
        {
            get { return _xmlPathName; }
            set
            {

                _xmlPathName = value;

                OnPropertyChanged(nameof(xmlPathName));
            }
        }
        #region DIYLEDModel
        private int _DiyLEDRows;
        public int DiyLEDRows
        {
            get { return _DiyLEDRows; }
            set
            {
                _DiyLEDRows = value;
                OnPropertyChanged(nameof(DiyLEDRows));
            }
        }

        private int _DiyLEDCols;
        public int DiyLEDCols
        {
            get { return _DiyLEDCols; }
            set
            {
                _DiyLEDCols = value;
                OnPropertyChanged(nameof(DiyLEDCols));
            }
        }

        private ObservableCollection<DIYLedModel> _DiyLedModelList = new ObservableCollection<DIYLedModel>();

        public ObservableCollection<DIYLedModel> DiyLedModelList
        {
            get { return _DiyLedModelList; }
            set
            {
                _DiyLedModelList = value;
                OnPropertyChanged(nameof(DiyLedModelList));
            }
        }

        public Object Clone()
        {
            var clone = new RootDIYLedModel
            {
                RootName = this.RootName,
                IsTest = this.IsTest,
                PathName = this.PathName,
                xmlPathName = this.xmlPathName,
                DiyLEDCols = this.DiyLEDCols,
                DiyLEDRows = this.DiyLEDRows,
                DiyLedModelList = this.DiyLedModelList

            };

            clone.DiyLedModelList = new ObservableCollection<DIYLedModel>(this.DiyLedModelList);

            return clone;
        }
        #endregion

    }
}
